home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
Libraries
/
SAT 2.3.8
/
Demos
/
HeartQuest demo ƒ
/
SoundConst.p
< prev
next >
Wrap
Text File
|
1995-07-15
|
2KB
|
64 lines
{=================================================}
{============= Sound Constants and handles ==============}
{=================================================}
{ Example file for Ingemars Sprite Animation Toolkit. }
{ © Ingemar Ragnemalm 1992 }
{ See doc files for legal terms for using this code. }
{ This file defines all the resource numbers for your sound resources, plus}
{ handles to each one. The procedure LoadSounds is called at startup. It calls}
{ the sound units for each sound to preload. Note that merely loading the sound}
{ is not enough if the sound units decide to use Sound Driver. }
{ When designing your game, my advice to you is to use sounds, several sounds,}
{ but not ridiculously many and large. A simplistic game that takes 1000k on disk}
{ just because it contains lots of sounds is just a waste of disk (and we have seen}
{ far too many of them on the shareware market), but a well-polished, complex}
{ and interesting game can use more. }
unit SoundConst;
interface
uses
{$IFC UNDEFINED THINK_PASCAL}
Types,
{$ENDC}
SAT;
const
splatt2Snd = 14315;
splatt3Snd = 20039;
klounkSnd = 21999;
plinkSnd = 10873;
sadarSnd = 25626;
jaSnd = 3024;
var
splatt2SndH, splatt3SndH, klounkSndH: Handle;
plinkSndH, sadarSndH, jaSndH, tickSndH, miuiuH, drringH: Handle;
procedure LoadSounds;
implementation
procedure LoadSounds;
begin
splatt2SndH := SATGetSound(splatt2Snd);
splatt3SndH := SATGetSound(splatt3Snd);
klounkSndH := SATGetSound(klounkSnd);
plinkSndH := SATGetSound(plinkSnd);
sadarSndH := SATGetSound(sadarSnd);
jaSndH := SATGetSound(jaSnd);
tickSndH := SATGetNamedSound('tick');
miuiuH := SATGetNamedSound('Miuiu');
drringH := SATGetNamedSound('Drring');
{Why I'm using SATGetSound most of the time but SATGetNamedSound for the last ones?}
{Because I started using resource id's, but later decided that the names are the "right"}
{way to get sounds! Use whatever way you like best.}
end;
end.